<template>
  <div ref="main" class="echarts"></div>
</template>
<script setup>
import { onMounted, ref ,nextTick } from "vue";
import * as echarts from "echarts";

const main = ref();
const props = defineProps(['options'])
//  console.log(main.value);
nextTick(() => {
  //   console.log(main.value);
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(main.value); // 绘制图表
  myChart.setOption(props.options);
});
</script>
<script>
import poprs from "./poprs.js";
export default {
  mixins:[poprs]
}; 
</script>
    
<style >
.echarts {
  width: 500px;
  height: 500px;
}
</style>